<?php
session_start();
require("../database.php");
include("header.php");
?>
<link href="../quiz.css" rel="stylesheet" type="text/css">

<SCRIPT LANGUAGE="JavaScript">
function check() {

alert("Do you want to delete");

return true;
}
</script>

<?php
extract($_POST);
//$test_temp_id=$_POST[testid];
//echo $test_temp_id;
echo "<BR>";
if (!isset($_SESSION[alogin]))
{
	echo "<br><h2><div  class=head1>You are not Logged On Please Login to Access this Page</div></h2>";
	echo "<a href=index.php><h3 align=center>Click Here for Login</h3></a>";
	exit();
}
if($_REQUEST[del_id])
{
$del_que=mysql_query("delete from mst_question where que_id=$_REQUEST[del_id]");
echo "</br></br><center><h2>Question has been deleted Succesfully</h2></center></br>";

}

$question_query = mysql_query("select * from mst_question where test_id=$testid", $cn) or die(mysql_error());

echo "</br>";
echo "<table border=1 align=center><tr class=style2> <td>S.No</td><td>Question</td> <td>Delete</td>";
for($i=0;$i<mysql_num_rows($question_query);$i++)
{
$j=$i+1;
$question_result = mysql_fetch_array($question_query);
echo "<tr class=style8><td>$j</td><td> $question_result[2] </td><td align=center><a href='view_test_question.php?del_id=$question_result[0]' onclick='return check();'><img src='images/b_deltbl.png' alt='Delete' title='Delete'></img></a></td>";
}
unset($_POST);

?>
